SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `authority`
-- ----------------------------
DROP TABLE IF EXISTS `authority`;
CREATE TABLE `authority` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `auth_id` varchar(255) DEFAULT NULL,
  `authority_content` varchar(255) DEFAULT NULL,
  `description` varchar(500) DEFAULT NULL,
  `module_id` int(11) DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `system_id` int(11) DEFAULT NULL,
  `type` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UKjdeu5vgpb8k5ptsqhrvamuad2` (`name`),
  UNIQUE KEY `UKigc5o0q50560t4wys6hw2qx55` (`system_id`,`auth_id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `authority`
-- ----------------------------
BEGIN;
INSERT INTO `authority` VALUES ('1', '100100001', 'querySubSystem', '查询子系统', '1001', '查询子系统', '100000', '1'), ('2', '100100002', 'createSubSystem', '新建子系统', '1001', '新建子系统', '100000', '1'), ('3', '100100003', 'modifySubSystem', '修改子系统', '1001', '修改子系统', '100000', '1'), ('4', '100100004', 'deleteSubSystem', '删除子系统', '1001', '删除子系统', '100000', '1'), ('5', '100200001', 'queryAuthority', '查询权限', '1002', '查询权限', '100000', '1'), ('6', '100200002', 'createAuthority', '新建权限', '1002', '新建权限', '100000', '1'), ('7', '100200003', 'modifyAuthority', '修改权限', '1002', '修改权限', '100000', '1'), ('8', '100200004', 'deleteAuthority', '删除权限', '1002', '删除权限', '100000', '1'), ('9', '100300001', 'queryRole', '查询角色', '1003', '查询角色', '100000', '1'), ('10', '100300002', 'createRole', '新建角色', '1003', '新建角色', '100000', '1'), ('11', '100300003', 'modifyRole', '修改角色', '1003', '修改角色', '100000', '1'), ('12', '100300004', 'deleteRole', '删除角色', '1003', '删除角色', '100000', '1'), ('13', '100400001', 'queryUser', '查询用户', '1004', '查询用户', '100000', '1'), ('14', '100400002', 'createUser', '新建用户', '1004', '新建用户', '100000', '1'), ('15', '100400003', 'modifyUser', '修改用户', '1004', '修改用户', '100000', '1'), ('16', '100400004', 'deleteUser', '删除用户', '1004', '删除用户', '100000', '1'), ('17', '100400005', 'importSubsystemUser', '导入子系统用户', '1004', '导入子系统用户', '100000', '1'), ('18', '100500001', 'queryOrganization', '查询组织机构', '1005', '查询组织机构', '100000', '1'), ('19', '100500002', 'createOrganization', '新建组织机构', '1005', '新建组织机构', '100000', '1'), ('20', '100500003', 'modifyOrganization', '修改组织机构', '1005', '修改组织机构', '100000', '1'), ('21', '100500004', 'deleteOrganization', '删除组织机构', '1005', '删除组织机构', '100000', '1'), ('22', '100600001', 'queryMainPageItem', '查询首页定制项', '1006', '查询首页定制项', '100000', '1'), ('23', '100600002', 'createMainPageItem', '新建首页定制项', '1006', '新建首页定制项', '100000', '1'), ('24', '100600003', 'modifyMainPageItem', '修改首页定制项', '1006', '修改首页定制项', '100000', '1'), ('25', '100600004', 'deleteMainPageItem', '删除首页定制项', '1006', '删除首页定制项', '100000', '1');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;




SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `user`
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `auth_type` int(11) NOT NULL,
  `display_name` varchar(120) DEFAULT NULL,
  `organization_code` varchar(500) DEFAULT NULL,
  `organization_id` int(11) DEFAULT NULL,
  `password` varchar(120) NOT NULL,
  `sub_system` int(11) NOT NULL,
  `title` varchar(500) DEFAULT NULL,
  `town_title` varchar(100) DEFAULT NULL,
  `username` varchar(120) NOT NULL,
  `usertype` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `user`
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES  ('1', '1', '管理员', '000', '1', 'admin', '0', 'admin', 'admin', 'admin', '1');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
